#pragma once

#include "Graphic.h"

// CShapeView view

class CShapeView : public CScrollView
{
	DECLARE_DYNCREATE(CShapeView)

	PSHAPEENTRY	m_pCurShape;
	long		m_nShapeLength;

	int			m_nCurShapeIndex;

	PGRAPHIC	m_pGraphic;
	PGRAPHIC	m_pDragImage;

	CImageList	m_ilDrag;
	bool m_bDragged;

protected:
	CShapeView();           // protected constructor used by dynamic creation
	virtual ~CShapeView();

public:
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual void OnInitialUpdate();     // first time after construct

	DECLARE_MESSAGE_MAP()
public:
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
};


